<div id="main_container">

	{$oZoneHeader}
    
    <div class="main_content">
        {$oZoneTopMenu}
        <div class="center_content">  
            <div class="left_content">
                {$oZoneLeftMenu}
                <h4>Liste des annonces par type : </h4> 
                    
                <table style="width:240px" id="rounded-corner" summary="2007 Major IT Companies' Profit">
                    
                        <tr>
                            <td class="{if $type == ANNONCE_A_VALIDER}typeActif{/if}"><label>Les annonces à valider</label> <a href="{if $nbAnnonceAValider}{jurl 'annonce~BoAnnonce:listeParType', array('type'=>ANNONCE_A_VALIDER)}{else}#{/if}" class="typeLeft">({$nbAnnonceAValider})</a></td>
                            
                        </tr>
                        <tr>
                        	<td class="{if $type == ANNONCE_A_CONTROLER}typeActif{/if}"><label>Les annonces modifiées : à contrôler </label><a href="{if $nbAnnonceAControler}{jurl 'annonce~BoAnnonce:listeParType', array('type'=>ANNONCE_A_CONTROLER)}{else}#{/if}" class="typeLeft">({$nbAnnonceAControler})</a></td>
                        </tr>
                        <tr>
                            <td class="{if $type == ANNONCE_EN_LIGNE}typeActif{/if}"><label>Les annonces en ligne </label><a href="{if $nbAnnonceEnLigne}{jurl 'annonce~BoAnnonce:listeParType', array('type'=>ANNONCE_EN_LIGNE)}{else}#{/if}" class="typeLeft">({$nbAnnonceEnLigne})</a></td>
                        </tr>
                        <tr>
                        	<td class="{if $type == ANNONCE_ARCHIVEES}typeActif{/if}"><label>Les annonces archivées </label><a href="{if $nbAnnonceArchivee}{jurl 'annonce~BoAnnonce:listeParType', array('type'=>ANNONCE_ARCHIVEES)}{else}#{/if}" class="typeLeft">({$nbAnnonceArchivee})</a></td>
                        </tr>
                        <tr>
                            <td class="{if $type == ANNONCE_SUPPRIMEES}typeActif{/if}"><label>Les annonces supprimées </label><a href="{if $nbAnnonceSupprimee}{jurl 'annonce~BoAnnonce:listeParType', array('type'=>ANNONCE_SUPPRIMEES)}{else}#{/if}" class="typeLeft">({$nbAnnonceSupprimee})</a></td>
                            
                        </tr>
                        <tr>
                        	<td class="{if $type == ANNONCE_PAYEES_NON_VALIDE}typeActif{/if}"><label>Les annonces payées non valides </label><a href="{if $nbAnnoncePayeNonValide}{jurl 'annonce~BoAnnonce:listeParType', array('type'=>ANNONCE_PAYEES_NON_VALIDE)}{else}#{/if}" class="typeLeft">({$nbAnnoncePayeNonValide})</a></td>
                        </tr>
                        <tr>
                            <td class="{if $type == ANNONCE_NON_PAYEES_VALIDE}typeActif{/if}"><label>Les annonces non payées valides </label><a href="{if $nbAnnonceNonPayeValide}{jurl 'annonce~BoAnnonce:listeParType', array('type'=>ANNONCE_NON_PAYEES_VALIDE)}{else}#{/if}" class="typeLeft">({$nbAnnonceNonPayeValide})</a></td>
                            
                        </tr>
                        <tr>
                        	<td class="{if $type == ANNONCE_NON_VALIDE}typeActif{/if}"><label>Les annonces non valides </label><a href="{if $nbAnnonceNonValide}{jurl 'annonce~BoAnnonce:listeParType', array('type'=>ANNONCE_NON_VALIDE)}{else}#{/if}" class="typeLeft">({$nbAnnonceNonValide})</a></td>
                        </tr>
                </table>
            </div>
            {literal}
                <script type="text/javascript">
                    $('.typeLeft').click(function () {
                        $('.typeLeft').each(function () {
                            $(this).removeClass('typeActif');
                        });
                        $(this).addClass('typeActif');
                    });
                </script>
                <style type="text/css">
                    .typeActif {background: #d2e7f0;}
                </style>
                    
            {/literal}
            <div class="right_content">
                <p class="clear">&nbsp;</p>
                <h2>Liste des annonces {$titreParType}</h2> 
                <table id="rounded-corner">
                    <thead>
                        <tr>
                            <th scope="col" class="rounded">Référence n°</th>
                            <th scope="col" class="rounded">Paramètres de connexion</th>
                            <th scope="col" class="rounded">Millesime</th>
                            <th scope="col" class="rounded">Version</th>
                            <th scope="col" class="rounded">Date de saisie</th>
                        </tr>
                    </thead>
                    <tbody>
                        {foreach $annonce as $annonceItem}
                            <tr>
                                <td>{$annonceItem->Occas_Reference |explode}</td>
                                <td>
                                    {if isset($annonceItem->IdOccasion)}
                                        {if isset($annonceItem->IdOccasion)}
                                            <a href="{jurl 'annonce~BoAnnonce:previsualiser',array('idOccasion'=>$annonceItem->IdOccasion)}">
                                        {/if}
                                        {$annonceItem->Vendeur_Nom} {$annonceItem->Vendeur_Naissance} {$annonceItem->Occas_NumImmatricul} 
                                            </a>
                                    {else}
                                        {$annonceItem->Vendeur_Nom} {$annonceItem->Vendeur_Naissance} {$annonceItem->Occas_NumImmatricul}
                                    {/if}

                                    {if $annonceItem->Occas_Valide}<u>({$annonceItem->Occas_Valide})</u>{else}{/if}
                                </td>
                                <td>{$annonceItem->Occas_Version}</td>
                                <td>{$annonceItem->Occas_Millesime}</td>
                                <td>{$annonceItem->Occas_DateSaisie}</td>
                            </tr>
                        {/foreach}
                    </tbody>
                </table>

                <div class="pagination">
                    <!-- begin Pagination -->
                        {if $oNavBar->iNbPages > 1}
                        <div class="navigPage clearfix">
                            {if $oNavBar->iPrevPage > 0}
                                <a title="précédent" href="{jurl 'annonce~BoAnnonce:listeParType', array('iCurrentPage' => $oNavBar->iPrevPage, 'type'=>$type)}"> < </a>&nbsp;
                            {/if}

                            {foreach $oNavBar->tiPages as $iPage}
                                <a  title="page {$iPage}" href="{jurl 'annonce~BoAnnonce:listeParType', array('iCurrentPage' => $iPage, 'type'=>$type)}" 
                                    {if $iPage == $oNavBar->iCurrPage} class="current" {/if}
                                >{$iPage}</a>&nbsp;|
                            {/foreach}

                            {if $oNavBar->iShowLast > 0}
                                …&nbsp;|
                                <a title="page {$oNavBar->iNbPages}" href="{jurl 'annonce~BoAnnonce:listeParType', array('iCurrentPage' => $oNavBar->iNbPages, 'type'=>$type)}">{$oNavBar->iNbPages}</a>&nbsp;
                            {/if}

                            {if $oNavBar->iNbPages > $oNavBar->iCurrPage}
                                <a title="suivant" href="{jurl 'annonce~BoAnnonce:listeParType', array('iCurrentPage' => $oNavBar->iNextPage, 'type'=>$type)}"> > </a>
                            {/if}

                        </div>
                        {/if}
                    <!-- end Pagination -->
                </div> 
               
            </div><!-- end of right content-->
        </div>   <!--end of center content -->

        <div class="clear"></div>
    </div> <!--end of main content-->
    <div class="footer">
    </div>
</div>
